/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package xilinx;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.filechooser.FileNameExtensionFilter;
/**
 *
 * @author dani
 */
public class InterfazJFrame extends javax.swing.JFrame {

    /**
     * Creates new form InterfazJFrame
     */
        //variables
    // int valores de 32 bits maximo
    int valorDeA = 0;
    int valorDeB = 0;
    int valorDeC = 0;
    // long valores de 64 bit maximo
    long valorDeP = 0;
    long valorDePCIN = 0;
    String A;String B; String C;String P; String PCIN;
    String paramA="";String paramB=""; String paramC="";String paramP=""; String paramPCIN="";
    int indexA;int indexB; int indexC;int indexP; int indexPCIN;int indexCarryInSel;
    int indexSigno1; int indexPrimerOp; int indexSigno2; int indexSegundoOp;
    int indexModo; int indexOperacionLogica; int indexMultX; int indexMultY; int indexOperaciones;
    int[] Z = new int[3];int[] Y = new int[2]; int[] X = new int[2];
    int[] ALUMODE= new int[4]; int[] CARRYINSEL=new int[3];
    boolean error = false;
    String  primerOperando; String  segundoOperando; String  signoPrimerOp; String  signoSegundoOp;
    boolean signo1; boolean signo2;
    OperacionesAritmeticas opArit;
  //efectos gráficos
    MyComboBoxRenderer  carry;  
    ArrayList<JTextPane> textPane=new ArrayList<JTextPane>();
    ArrayList<JComboBox> comboBox=new ArrayList<JComboBox>();
    ArrayList<JLabel> label=new ArrayList<JLabel>();
  //ficheros
    File fichero; // Ruta del fichero a modificar
    MyFile file=new MyFile();  
    ArrayList listaParametros;
    
    public InterfazJFrame() {
        initComponents();
         entradaA.setToolTipText( "<html>El primer digito determina el signo</html>" );
         outP.setToolTipText( "<html>El primer digito determina el signo</html>" );
         entradaC.setToolTipText( "<html>El primer digito determina el signo</html>" );
         entradaP.setToolTipText( "<html>El primer digito determina el signo</html>" );
         outOPMODE.setToolTipText( "<html>El primer digito determina el signo</html>" );
         entradaPCIN.setToolTipText( "<html>El primer digito determina el signo</html>" );
         jTabbedPane1.addChangeListener(changeListener);
         jTabbedPane1.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
         carry=new MyComboBoxRenderer();
         opArit= new OperacionesAritmeticas();
         rellenarListas();
         cambioOperacion();
         fichero=null;
         carrySel.setRenderer(new MyComboBoxRenderer());
         reset();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        DataIn = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        potencia_A = new javax.swing.JComboBox();
        potencia_B = new javax.swing.JComboBox();
        jLabelA = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        entradaC = new javax.swing.JTextPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        entradaA = new javax.swing.JTextPane();
        jLabelB = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        entradaB = new javax.swing.JTextPane();
        jLabel4 = new javax.swing.JLabel();
        potencia_C = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        entradaP = new javax.swing.JTextPane();
        potencia_P = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        entradaPCIN = new javax.swing.JTextPane();
        potencia_PCIN = new javax.swing.JComboBox();
        jPanel2 = new javax.swing.JPanel();
        signoOp1 = new javax.swing.JComboBox();
        primerOp = new javax.swing.JComboBox();
        arit1 = new javax.swing.JLabel();
        signoOp2 = new javax.swing.JComboBox();
        segundoOp = new javax.swing.JComboBox();
        arit2 = new javax.swing.JLabel();
        operaciones = new javax.swing.JComboBox();
        jLabel17 = new javax.swing.JLabel();
        arit4 = new javax.swing.JLabel();
        arit5 = new javax.swing.JLabel();
        arit7 = new javax.swing.JLabel();
        modo = new javax.swing.JComboBox();
        arit8 = new javax.swing.JLabel();
        carrySel = new javax.swing.JComboBox();
        arit6 = new javax.swing.JLabel();
        arit3 = new javax.swing.JLabel();
        log1 = new javax.swing.JLabel();
        multX = new javax.swing.JComboBox();
        log3 = new javax.swing.JLabel();
        multZ = new javax.swing.JComboBox();
        OpLog = new javax.swing.JComboBox();
        log2 = new javax.swing.JLabel();
        resultado = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        outBCOUNT = new javax.swing.JTextPane();
        jScrollPane7 = new javax.swing.JScrollPane();
        outPCOUNT = new javax.swing.JTextPane();
        jScrollPane8 = new javax.swing.JScrollPane();
        outP = new javax.swing.JTextPane();
        jLabel12 = new javax.swing.JLabel();
        DataOut = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        outOPMODE = new javax.swing.JTextPane();
        jLabel7 = new javax.swing.JLabel();
        jScrollPane10 = new javax.swing.JScrollPane();
        outALUMODE = new javax.swing.JTextPane();
        jLabel13 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        outCARRYINSEL = new javax.swing.JTextPane();
        parametros = new javax.swing.JPanel();
        button2 = new java.awt.Button();
        jLabel18 = new javax.swing.JLabel();
        jButtonOK = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        salir = new javax.swing.JMenu();
        nuevaConf = new javax.swing.JMenuItem();
        abrirConf = new javax.swing.JMenuItem();
        guardarConf = new javax.swing.JMenuItem();
        GuardarComo = new javax.swing.JMenuItem();
        salirConf = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Configurador de DSP de Xilinx\n");

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel1.setText("Entada de Datos");

        potencia_A.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Decimal", "Binario", "Hexadecimal" }));

        potencia_B.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Decimal", "Binario", "Hexadecimal" }));

        jLabelA.setText("A [29:0]");

        jScrollPane3.setViewportView(entradaC);

        entradaA.setToolTipText("");
        jScrollPane1.setViewportView(entradaA);

        jLabelB.setText("B [17:0]");

        jScrollPane2.setViewportView(entradaB);

        jLabel4.setText("C [47:0]");

        potencia_C.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Decimal", "Binario", "Hexadecimal" }));

        jLabel5.setText("P [17:0]");

        jScrollPane4.setViewportView(entradaP);

        potencia_P.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Decimal", "Binario", "Hexadecimal" }));

        jLabel6.setText("PCIN [47.0]");

        jScrollPane5.setViewportView(entradaPCIN);

        potencia_PCIN.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Decimal", "Binario", "Hexadecimal" }));

        javax.swing.GroupLayout DataInLayout = new javax.swing.GroupLayout(DataIn);
        DataIn.setLayout(DataInLayout);
        DataInLayout.setHorizontalGroup(
            DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DataInLayout.createSequentialGroup()
                .addGap(197, 197, 197)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 203, Short.MAX_VALUE))
            .addGroup(DataInLayout.createSequentialGroup()
                .addGap(76, 76, 76)
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jLabelA)
                    .addComponent(jLabelB)
                    .addComponent(jLabel4)
                    .addComponent(jLabel6))
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataInLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
                                .addComponent(jScrollPane3))))
                    .addGroup(DataInLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(38, 38, 38)
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(potencia_P, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(potencia_PCIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(potencia_C, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(potencia_B, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(potencia_A, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        DataInLayout.setVerticalGroup(
            DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DataInLayout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addComponent(jLabel1)
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(DataInLayout.createSequentialGroup()
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addGap(64, 64, 64)
                                .addComponent(jLabelA))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataInLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataInLayout.createSequentialGroup()
                                        .addComponent(potencia_A, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(8, 8, 8)))))
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addGap(27, 27, 27)
                                .addComponent(potencia_B, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(DataInLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelB)))
                .addGap(27, 27, 27)
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DataInLayout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(jLabel4)
                        .addGap(48, 48, 48)
                        .addComponent(jLabel5))
                    .addGroup(DataInLayout.createSequentialGroup()
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(potencia_C, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(22, 22, 22)
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addComponent(potencia_P, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataInLayout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(19, 19, 19))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataInLayout.createSequentialGroup()
                        .addGroup(DataInLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(DataInLayout.createSequentialGroup()
                                .addComponent(potencia_PCIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(9, 9, 9)))
                        .addGap(23, 23, 23))))
        );

        jTabbedPane1.addTab("Valores de entrada", DataIn);

        signoOp1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "+", "-" }));

        primerOp.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ZERO", "PCIN", "P", "C", "Shift(PCIN)", "Shift(P)" }));

        arit1.setText("Primer Operando");

        signoOp2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "+", "-" }));

        segundoOp.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ZERO", "-1", "C", "AxB", "p", "P - 1", "p + c", "a:b", "a:b - 1", "a:b + c" }));

        arit2.setText("Segundo Operando");

        operaciones.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Aritmética", "Lógica" }));
        operaciones.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                operacionesItemStateChanged(evt);
            }
        });

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel17.setText("Operacion a realizar");

        arit4.setText("P=");

        arit5.setText("(");

        arit7.setText(")");

        modo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "One 48-Bit", "Two 24-Bit", "Four 12-Bit" }));

        arit8.setText("Modo");

        carrySel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CARRYIN", "~PCIN[47]", "CARRYCASCIN", "PCIN[47]", "CARRYCASCOUT", "~P[47]", "A[24] XNOR B[17]", "P[47]" }));

        arit6.setText("+");

        arit3.setText("Carry");

        log1.setText("Multiplexor X");

        multX.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ZERO", "P", "A:B" }));

        log3.setText("Multiplexor Z");

        multZ.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ZERO", "C", "P", "PCIN", "Shirtf(P)", "Shirtf(PCIN)" }));

        OpLog.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "x XOR z", "NOT (x XOR z)", "x OR z", "(NOT x) OR z", "x OR (NOT z)", "NOT(x OR z)", "x AND z", "(NOT x) AND z", "x AND (NOT z)", "NOT( x AND z)" }));

        log2.setText("Operación");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(1, 1, 1)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(arit4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                                .addComponent(signoOp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(primerOp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(log1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(multX, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(log2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(OpLog, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                        .addComponent(signoOp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(arit5, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(12, 12, 12)
                                        .addComponent(segundoOp, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(arit6))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                        .addComponent(arit8)
                                        .addGap(39, 39, 39)
                                        .addComponent(modo, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(arit2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(20, 20, 20)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(carrySel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(arit7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(log3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(multZ, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(78, 78, 78)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel17)
                                .addGap(91, 91, 91)
                                .addComponent(operaciones, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(arit1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(arit3)
                                .addGap(69, 69, 69)))))
                .addGap(26, 26, 26))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(87, 87, 87)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(operaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(67, 67, 67)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(arit1)
                    .addComponent(arit2)
                    .addComponent(arit3))
                .addGap(36, 36, 36)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(primerOp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(signoOp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arit4)
                    .addComponent(signoOp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arit5)
                    .addComponent(segundoOp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arit6)
                    .addComponent(carrySel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arit7))
                .addGap(32, 32, 32)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(multX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(OpLog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(multZ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(log1)
                    .addComponent(log3)
                    .addComponent(log2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(modo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arit8))
                .addGap(73, 73, 73))
        );

        jTabbedPane1.addTab("Operación a realizar", jPanel2);

        jLabel8.setText("BCOUNT [17:0]");

        jLabel9.setText("PCOUNT [47:0]");

        jLabel10.setText("P [47:0]");

        outBCOUNT.setEditable(false);
        jScrollPane6.setViewportView(outBCOUNT);

        outPCOUNT.setEditable(false);
        jScrollPane7.setViewportView(outPCOUNT);

        outP.setEditable(false);
        jScrollPane8.setViewportView(outP);

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel12.setText("Resultados");

        javax.swing.GroupLayout resultadoLayout = new javax.swing.GroupLayout(resultado);
        resultado.setLayout(resultadoLayout);
        resultadoLayout.setHorizontalGroup(
            resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultadoLayout.createSequentialGroup()
                .addGroup(resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(resultadoLayout.createSequentialGroup()
                        .addGap(227, 227, 227)
                        .addComponent(jLabel12))
                    .addGroup(resultadoLayout.createSequentialGroup()
                        .addGap(123, 123, 123)
                        .addGroup(resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(resultadoLayout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(resultadoLayout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(resultadoLayout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(79, 79, 79)
                                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(136, Short.MAX_VALUE))
        );
        resultadoLayout.setVerticalGroup(
            resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultadoLayout.createSequentialGroup()
                .addGap(84, 84, 84)
                .addComponent(jLabel12)
                .addGap(49, 49, 49)
                .addGroup(resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(resultadoLayout.createSequentialGroup()
                        .addGroup(resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel8)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(37, 37, 37)
                        .addComponent(jLabel9))
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(34, 34, 34)
                .addGroup(resultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel10)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(128, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Comprobar resultado", resultado);

        jScrollPane9.setViewportView(outOPMODE);

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel7.setText("Datos de Salida");

        jScrollPane10.setViewportView(outALUMODE);

        jLabel13.setText("ALUMODE [3:0]");

        jLabel11.setText("OPMODE [6:0]");

        jLabel20.setText("CARRYINSEL [2:0]");

        jScrollPane11.setViewportView(outCARRYINSEL);

        javax.swing.GroupLayout DataOutLayout = new javax.swing.GroupLayout(DataOut);
        DataOut.setLayout(DataOutLayout);
        DataOutLayout.setHorizontalGroup(
            DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DataOutLayout.createSequentialGroup()
                .addGap(136, 136, 136)
                .addGroup(DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11)
                    .addComponent(jLabel13)
                    .addComponent(jLabel20))
                .addGap(89, 89, 89)
                .addGroup(DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(136, 136, 136))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DataOutLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(199, 199, 199))
        );
        DataOutLayout.setVerticalGroup(
            DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DataOutLayout.createSequentialGroup()
                .addGap(88, 88, 88)
                .addComponent(jLabel7)
                .addGap(44, 44, 44)
                .addGroup(DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel11)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22)
                .addGroup(DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel13)
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addGroup(DataOutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel20)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(139, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Datos de Salida ", DataOut);

        button2.setLabel("button2");

        javax.swing.GroupLayout parametrosLayout = new javax.swing.GroupLayout(parametros);
        parametros.setLayout(parametrosLayout);
        parametrosLayout.setHorizontalGroup(
            parametrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 557, Short.MAX_VALUE)
        );
        parametrosLayout.setVerticalGroup(
            parametrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 412, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Configuración de parámetros", parametros);

        jLabel18.setIcon(new javax.swing.ImageIcon("C:\\Users\\dani\\Pictures\\68p6.png")); // NOI18N

        jButtonOK.setText("Ok");
        jButtonOK.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jButtonOKMousePressed(evt);
            }
        });

        salir.setText("Archivo");

        nuevaConf.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
        nuevaConf.setText("Nueva Configuración");
        nuevaConf.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nuevaConfActionPerformed(evt);
            }
        });
        salir.add(nuevaConf);

        abrirConf.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        abrirConf.setText("Abrir Configuración");
        abrirConf.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                abrirConfMousePressed(evt);
            }
        });
        salir.add(abrirConf);

        guardarConf.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK));
        guardarConf.setText("Guardar Configuración");
        guardarConf.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                guardarConfMousePressed(evt);
            }
        });
        salir.add(guardarConf);

        GuardarComo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F12, 0));
        GuardarComo.setText("Guardar Como..");
        GuardarComo.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                GuardarComoMousePressed(evt);
            }
        });
        salir.add(GuardarComo);

        salirConf.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        salirConf.setText("Salir");
        salirConf.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salirConfActionPerformed(evt);
            }
        });
        salir.add(salirConf);

        jMenuBar1.add(salir);

        jMenu2.setText("Acciones");

        jMenuItem1.setText("Exportar a xilinx");
        jMenu2.add(jMenuItem1);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 562, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(155, 155, 155)
                        .addComponent(jButtonOK, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(266, Short.MAX_VALUE))
                    .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(51, 51, 51)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButtonOK)
                .addGap(37, 37, 37))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonOKMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonOKMousePressed
        try {
            // TODO add your handling code here:
            accionBotonOK();
            
        } catch (Exception ex) {
            Logger.getLogger(InterfazJFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jButtonOKMousePressed
      ChangeListener changeListener = new ChangeListener() {
      public void stateChanged(ChangeEvent changeEvent)
      {
         JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent.getSource();
         int index = sourceTabbedPane.getSelectedIndex();
         switch(index)
         {
             case 0:
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/entradas.png")));
                    break;
             case 1:
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/imagen.png")));
                    break;
             case 2:
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/carry.png")));
                    break;
             case 3: 
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/dataOut.png")));
                    break;
             case 4:
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/salida.png")));
                    break;
             default:
                    jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xilinx/Imagenes/imagen.png")));           
         }
      }};
      
   

    private void nuevaConfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nuevaConfActionPerformed
        reset();
        file=new MyFile();
    }//GEN-LAST:event_nuevaConfActionPerformed

    private void abrirConfMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_abrirConfMousePressed
        MyFile newMyFile= new MyFile();
        newMyFile.abrirNuevaConfiguracion();
        cargarNuevaConfiguracion(newMyFile);
        cambioOperacion();
    }//GEN-LAST:event_abrirConfMousePressed

    private void GuardarComoMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_GuardarComoMousePressed
        // TODO add your handling code here:
        file= new MyFile();
        obtenerValorParam();
        file.guardarComoConfiguracion(listaParametros);;
    }//GEN-LAST:event_GuardarComoMousePressed

    private void salirConfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salirConfActionPerformed
        System.exit(0);
    }//GEN-LAST:event_salirConfActionPerformed

    private void guardarConfMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_guardarConfMousePressed
          
     obtenerValorParam();
     file.guardarConfiguracion(listaParametros);
    }//GEN-LAST:event_guardarConfMousePressed

    private void operacionesItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_operacionesItemStateChanged
        cambioOperacion();
    }//GEN-LAST:event_operacionesItemStateChanged

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try 
        {
             
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
 
        } 
        catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(InterfazJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } 
        catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(InterfazJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } 
        catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(InterfazJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } 
        catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(InterfazJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InterfazJFrame().setVisible(true);
               
            }
        });


    }



  /*  public long cambioBase(String cadena, int limite, int potencia) throws Exception
    {
        try
        {
           boolean signo; //true positivo, false negativo 
           if(cadena.equals(""))
        	   return 0;
           char signo2= cadena.charAt(0);
           double maximo=Math.pow(2, limite);
            if(cadena.length()<2 &&  potencia!=10)
               throw new Exception("El numero en representacion en complemento necesita al menos dos digitos");
        
            //Caso de decimal ya esta transformado
           if(potencia == 10)
           {
               if(Math.pow(2, limite)>Long.parseLong(cadena, potencia) &&(-1)*Math.pow(2, limite)<Long.parseLong(cadena, potencia) )
                 return  Long.parseLong(cadena, potencia);
               else
                  throw new Exception("la cadena de digitos sobrepasa el limite establecido para dicho registro"); 
           }
        //Caso de binario hay que transformalos a sistema decimal tener en cuenta que esta en sitema complemento a dos    
          if(potencia == 2)
          {
                if (signo2=='1')
                    signo=true;
                else
                    if (signo2=='0')
                         signo=false;
                    else
                         throw new Exception("El primer digito del numero tiene que corresponder con el signo");
                for(int i=0;i<cadena.length();i++) //comprobamos que la cadena esta formada por 0s y 1s 
                {
                    if(cadena.charAt(i)=='0' || cadena.charAt(i)=='1' )
                        continue;
                    else
                         throw new Exception("Los caracteres introducidos no corresponde con valores binarios"); 
                }  
                if(Math.pow(2, limite)>Long.parseLong(cadena, potencia) &&(-1)*Math.pow(2, limite)<Long.parseLong(cadena, potencia) )
                    if(!signo)
                        return ( Long.parseLong(cadena, potencia));
                    else //lo convertimos a complemento a dos
                     {
                        return ( -Long.parseLong(complementoADos(cadena), potencia));
                     }
                else
                  throw new Exception("la cadena de digitos sobrepasa el limite establecido para dicho registro");   
            }  

       //Caso de Hexadecimal hay que transformalos a sistema decimal tener en cuenta que esta en sitema complemento  
         if(potencia == 16)
           {
                if (signo2=='F')
                    signo=true;
                else
                    if(signo2=='0')
                        signo=false;
                    else
                        throw new Exception("El primer digito del numero tiene que corresponder con el signo");

                for(int i=0;i<cadena.length();i++)     
                {
                    if(cadena.charAt(i)=='0' || cadena.charAt(i)=='1'|| cadena.charAt(i)=='2'|| cadena.charAt(i)=='3'
                        || cadena.charAt(i)=='4' || cadena.charAt(i)=='5'|| cadena.charAt(i)=='6'|| cadena.charAt(i)=='7'
                        || cadena.charAt(i)=='8' || cadena.charAt(i)=='9'|| cadena.charAt(i)=='a'|| cadena.charAt(i)=='A'
                        || cadena.charAt(i)=='b' || cadena.charAt(i)=='B'|| cadena.charAt(i)=='c'|| cadena.charAt(i)=='C'
                        || cadena.charAt(i)=='e' || cadena.charAt(i)=='E'|| cadena.charAt(i)=='f'|| cadena.charAt(i)=='F')
                            continue;
                    else
                            throw new Exception("Los caracteres introducidos no corresponde con valores en representaciÃ³n hexadecimal"); 
                }  
                if(Math.pow(2, limite )>Long.parseLong(cadena, potencia) &&(-1)*Math.pow(2, limite)<Long.parseLong(cadena, potencia) )
                    if(signo)
                        return ( Long.parseLong(cadena, potencia));
                    else //lo convertimos a complemento a dos
                    {
                        String subcadena=cadena.substring(1,cadena.length());
                        return ( -Long.parseLong(subcadena, potencia)-1);
                    }
                else
                  throw new Exception("la cadena de digitos sobrepasa el limite establecido para dicho registro"); 
            }  
          }
        catch(Exception e)
        {
            System.err.println(e.toString());
        }
        return 0;
    }
    public String complementoADos(String cadena)
    {
        String solucion2="";
        boolean encontrado=false;
        for(int i=cadena.length()-1;i>=0;i--)
        {
            if(encontrado)
            {
                if(cadena.charAt(i)=='1')
                    solucion2="0"+""+solucion2;
                else
                    solucion2="1"+""+solucion2;
            }
            else
            {
                if(cadena.charAt(i)=='1' && !encontrado)
                {
                    encontrado=true;
                    solucion2="1"+""+solucion2;
                }   
                if(cadena.charAt(i)=='0' && !encontrado)  
                  solucion2="0"+""+solucion2;
            }
        }
        return solucion2;
    
    }*/
    public void cargarNuevaConfiguracion(MyFile myFile)
    { 
        String[] datos;
        datos=file.getDatos();
        for(int i=0;i<datos.length;i++)
        {
            if(i<5)
                textPane.get(i).setText(myFile.getDato(datos[i]));
            else
                comboBox.get(i-5).setSelectedIndex(Integer.parseInt(myFile.getDato(datos[i])));            
        }
        cambioOperacion();
    }
    
    
  /*  public int obtenerPotencia(String valor)
    {
        int potencia=0;
            switch(valor)
            {
                case "Hexadecimal":{potencia=16; break;}
                case "Binario":{potencia=2; break;}
                case "Decimal":{potencia=10; break;}
            }
            return potencia;
    }
    public String pasarDecimalBinario(String valor, int num)
    {
    	Integer r=Integer.parseInt(valor);
        String s=r.toBinaryString(r);
        int longitud=s.length();
        String aux="";     
        for(int i=0; i<num-longitud;i++)
        {
                if(r<0)
                     aux+="1";
                else
                     aux+="0";
        }
        s=aux+s;
        return s;
    }
    //valor de A tiene la restriccion de 
  */ 
    public void entadaDeDatos()
    {
        String[] info={"valor de A: ","valor de B: ","valor de C: ","valor de P: ","valor de PCIN: "};
        Object[] valores={valorDeA,valorDeB,valorDeC,valorDeP,valorDePCIN};
        Object[] datos={A,B,C,P,PCIN};
        String[] info2={"A","B","C","P","PCIN"};
        int []  limites={30,18,48,48,48};
        for(int i=0;i<info.length;i++)
        {
            try
            {
                String potencia=comboBox.get(i).getSelectedItem().toString();
                String cadena=textPane.get(i).getText();
                valores[i]= (int) (long)opArit.cambioBase(potencia,cadena,limites[i]);
            }
            catch(Exception e)
             {
                 System.out.println(e.toString());
             }
            System.out.println(info[i]+valores[i]);
            datos[i]=(String)opArit.pasarDecimalBinario(""+valores[i],limites[i]);
            System.out.println(info2[i]+": "+datos[i]);  
        } 
    }
    
    /*
    public void obtenerValorDeA() 
    {  
        int potenciaA;
        int limite=30;
        try
        {
            String valor=potencia_A.getSelectedItem().toString();
            potenciaA=obtenerPotencia(valor);
            valorDeA = (int) (long)cambioBase(entradaA.getText(),limite,potenciaA);
        }
 
        System.out.println("valor de A: "+valorDeA);
        A=pasarDecimalBinario(""+valorDeA,limite);
        System.out.println("A: "+A);
    }
    
    public void obtenerValorDeB() 
    {
        int potenciaB;
        int limite=18;
        try
        {
            String valor=potencia_B.getSelectedItem().toString();
            potenciaB=obtenerPotencia(valor);
            valorDeB = (int) (long)cambioBase(entradaB.getText(),limite,potenciaB);
        }
        catch(Exception e)
        {
            System.out.println(e.toString());
        }
        System.out.println("valor de B: "+valorDeB);
        B=pasarDecimalBinario(""+valorDeB,limite);
        System.out.println("B: "+B);
    }
    
    public  void obtenerValorDeC() 
    {
        int potenciaC;
        int limite=48;
        try
        {
            String  valor=potencia_C.getSelectedItem().toString();
            potenciaC=obtenerPotencia(valor);
            valorDeC = (int) (long)cambioBase(entradaC.getText(),limite,potenciaC);
        }
        catch(Exception e)
        {
            System.out.println(e.toString());
        }
        System.out.println("valor de C: "+valorDeC);
        C=pasarDecimalBinario(""+valorDeC,limite);
        System.out.println("C: "+C); 
    }
   
    public void obtenerValorDeP() 
    {
        int potenciaP;
        int limite=48;
        try
        {
            String  valor=potencia_P.getSelectedItem().toString();
            potenciaP=obtenerPotencia(valor);
            valorDeP = (int) (long)cambioBase(entradaP.getText(),limite,potenciaP);
        }
        catch(Exception e)
        {
            System.out.println(e.toString());
        }
        System.out.println("valor de P: "+valorDeP);
        P=pasarDecimalBinario(""+valorDeP,limite);
        System.out.println("P: "+P);
    }
      
    public void obtenerValorDePCIN() 
    {
        int potenciaPCIN;
        int limite=48;
        try
        {
            String  valor=potencia_PCIN.getSelectedItem().toString();
            potenciaPCIN=obtenerPotencia(valor);
            valorDePCIN = (int) (long)cambioBase(entradaPCIN.getText(),limite,potenciaPCIN);
        }
        catch(Exception e)
        {
            System.out.println(e.toString());
        }
        System.out.println("valor de BCIN: "+valorDePCIN);
        PCIN=pasarDecimalBinario(""+valorDePCIN,limite);
        System.out.println("PCIN: "+PCIN);
    }
    */
    public void obtenerValorParam()
    {
        entadaDeDatos();
        listaParametros=new ArrayList();
        for(int i=0;i<5; i++)
        {
            String aux=""+textPane.get(i).getText().toString();
            listaParametros.add(aux);
        }
        for(int i=0;i<comboBox.size() ;i++)
        {
            int aux=comboBox.get(i).getSelectedIndex();
            listaParametros.add(aux);
        }
    }
    
  /*  
    public void obtenerEntradas() 
    {
            obtenerValorDeA();
            obtenerValorDeB();
            obtenerValorDeC();
            obtenerValorDeP();
            obtenerValorDePCIN();
    }
    */
    public void mostarValor(int valor) 
    {
        outOPMODE.setText(""+valor);
    }
    
    public void rellenarListas()
   {
        textPane.add(entradaA);//i=0
        textPane.add(entradaB);
        textPane.add(entradaC);
        textPane.add(entradaP);
        textPane.add(entradaPCIN);//i=4

        textPane.add(outALUMODE);//i=5
        textPane.add(outCARRYINSEL);
        textPane.add(outOPMODE);
        textPane.add(outBCOUNT);
        textPane.add(outP);
        textPane.add(outPCOUNT);//i=10
        //entrada de datos
        comboBox.add(potencia_A); //i=0
        comboBox.add(potencia_B);
        comboBox.add(potencia_C);
        comboBox.add(potencia_P);
        comboBox.add(potencia_PCIN);//i=4
        //operaciones aritmeticas
        comboBox.add(primerOp);//i=5
        comboBox.add(segundoOp);
        comboBox.add(signoOp1);
        comboBox.add(signoOp2);
        comboBox.add(carrySel);
        comboBox.add(modo);//i=10
        //operaciones logicas
        comboBox.add(OpLog);//i=11
        comboBox.add(multX);
        comboBox.add(multZ);//i=13
        //seleccion del tipo de operacion
        comboBox.add(operaciones);

        label.add(arit1);//i=0
        label.add(arit2);
        label.add(arit3);
        label.add(arit4);
        label.add(arit5);
        label.add(arit6);
        label.add(arit7);
        label.add(arit8);//i=7
        label.add(log1);//i=8
        label.add(log2);
        label.add(log3);
    
   }
    
    

    public void reset()
    {    
        valorDeA = 0;
        valorDeB = 0;
        valorDeC = 0;
        for(int i=0;i<textPane.size();i++)
               textPane.get(i).setText("");
        for(int i=5;i<textPane.size();i++)
            textPane.get(i).setEditable(false);
         for(int i=0;i<comboBox.size();i++)
               comboBox.get(i).setSelectedIndex(0);
        Z[0] = 0; Z[1] = 0; Z[2] = 0;
        Y[0] = 0; Y[1] = 0;
        X[0] = 0; X[1] = 0;
        ALUMODE[3] = 0; ALUMODE[2] = 0; ALUMODE[1] = 0; ALUMODE[0] = 0;
        CARRYINSEL[2] = 0; CARRYINSEL[1] = 0; CARRYINSEL[0] = 0;
        
    }

    public void cambioOperacion()
    {
        boolean operacionesAritmeticas;
        if(operaciones.getSelectedIndex()==0)
            operacionesAritmeticas=true;
        else
            operacionesAritmeticas=false;
        for(int i=5;i<comboBox.size()-1;i++)   
        {
            if(i<11) //arit
                comboBox.get(i).setVisible(operacionesAritmeticas);
            else
                comboBox.get(i).setVisible(!operacionesAritmeticas);
        }
        for(int i=0;i<label.size();i++)
        {
            if(i<8)
                label.get(i).setVisible(operacionesAritmeticas);
            else
                label.get(i).setVisible(!operacionesAritmeticas);
        }
    }

    public void completarSignos()
    {
        if(signoPrimerOp.equals("+"))
    		signo1=false;
    	else
    		signo1=true;
        if(signoSegundoOp.equals("+"))
    		signo2=false;
    	else
    		signo2=true;
    }

    public void generarCarryinSel(String sel)
    {   
        switch(sel)
        {
            case "CARRYIN": 
                    CARRYINSEL[2] = 0; CARRYINSEL[1] = 0; CARRYINSEL[0] = 0;
                    break;
            case "~PCIN[47]":
                    CARRYINSEL[2] = 0; CARRYINSEL[1] = 0; CARRYINSEL[0] = 1;
                    break;
            case "CARRYCASCIN":
                    CARRYINSEL[2] = 0; CARRYINSEL[1] = 1; CARRYINSEL[0] = 0;
                    break;
            case "PCIN[47]":
                    CARRYINSEL[2] = 0; CARRYINSEL[1] = 1; CARRYINSEL[0] = 1;
                    break;
            case "CARRYCASCOUT":
                    CARRYINSEL[2] = 1; CARRYINSEL[1] = 0; CARRYINSEL[0] = 0;
                    break;    
            case "~P[47]":
                    CARRYINSEL[2] = 1; CARRYINSEL[1] = 0; CARRYINSEL[0] = 1;
                    break; 
            case "A[24] XNOR B[17]":
                    CARRYINSEL[2] = 1; CARRYINSEL[1] = 1; CARRYINSEL[0] = 0;
                    break;   
            case "P[47]":
                    CARRYINSEL[2] = 1; CARRYINSEL[1] = 1; CARRYINSEL[0] = 1;
                    break;   
            default:
                    {        
                        CARRYINSEL[2] = 1; CARRYINSEL[1] = 0; CARRYINSEL[0] = 0;
                    }          
        }
    
    }
    
    public void generadorOPMODE()
    {
        multiplexorZ();
        localizarSegundoOperando();
        completarSignos();
    }
    
    
    public void generarALUMODE()
    {
        if(!signo1 && !signo2)
        {
            ALUMODE[3] = 0; ALUMODE[2] = 0; ALUMODE[1] = 0; ALUMODE[0] = 0;
        }
        if(!signo1 && signo2)
        {
            ALUMODE[3] = 0; ALUMODE[2] = 0; ALUMODE[1] = 1; ALUMODE[0] = 1;
        }
        if(signo1 && !signo2)
        {
            ALUMODE[3] = 0; ALUMODE[2] = 0; ALUMODE[1] = 0; ALUMODE[0] = 1;
        }
          if(signo1 && signo2)
        {
            ALUMODE[3] = 0; ALUMODE[2] = 0; ALUMODE[1] = 1; ALUMODE[0] = 0;
        }      
    }
    
    
    
    public void multiplexorZ()
    {
        switch(primerOperando)
            {
                case "ZERO":  
                        Z[2] = 0; Z[1] = 0; Z[0] = 0;
                        break;
                case"PCIN":
                        Z[2] = 0; Z[1] = 0; Z[0] = 1;
                        break;
                case "P":
                        Z[2] = 0; Z[1] = 1; Z[0] = 0;
                        break;
                case "C":  
                        Z[2] = 0; Z[1] = 1; Z[0] = 1;
                        break;
                case"Shift(P)":
                        Z[2] = 1; Z[1] = 1; Z[0] = 0;
                        break;
                case"Shift(PCIN)":
            		Z[2] = 1; Z[1] = 0; Z[0] = 1;
                    break;
            }
    	  
    }
    public void multiplexorX()
    {
    	 switch(segundoOperando)
    	 {
    	 	case "ZERO":
                        X[1] = 0; X[0]= 0;
                        break;
    	 	case "AxB":
                        X[1] = 0; X[0]= 1;
                        break;
    	 	case "P":
                        X[1] = 1; X[0]= 0;
                        break;
    	 	case "A:B":
                        X[1] = 1; X[0]= 1;
                        break;
    	 	default:
                        X[1] = 0; X[0]= 0;
	 					
    	 }
    }
    public void multiplexorY()
    {
         switch(segundoOperando)
         {
                case "ZERO":
                        Y[1] = 0; Y[0]= 0;
                        break;
                case "AxB":
                        Y[1] = 0; Y[0]= 1;
                        break;
         	case "-1":
                        Y[1] = 1; Y[0]= 0;
                        break;
                case "C":
                        Y[1] = 1; Y[0]= 1;
                        break;
                default:
                        X[1] = 0; X[0]= 0;
         }
    }
    
    
    
    public void localizarSegundoOperando()
    {
	    switch(segundoOperando)
        {
            case "ZERO":
                    Y[1]=0; Y[0]=0;//valor de Y = 0
                    X[1]=0; X[0]=0;//valor de X = 0
                    break;
            case "-1":  
                    Y[1]=1; Y[0]=0;//valor de Y = -1
                    X[1]=0; X[0]=0;//valor de X = 0
                    break;
            case "C":
                    Y[1]=1; Y[0]=1;//valor de Y = C
                    X[1]=0; X[0]=0;//valor de X = 0		
                    break;
            case "AxB":
                    Y[1]=0; Y[0]=1;//valor de Y =
                    X[1]=0; X[0]=1;//valor de X = AxB
                    break;
            case "P":  
                    Y[1]=0; Y[0]=0;//valor de Y = 0
                    X[1]=1; X[0]=0;//valor de X = P
                    break;
            case "P - 1":
                    Y[1]=1; Y[0]=0;//valor de Y = -1
                    X[1]=1; X[0]=0;//valor de X = P
                    break;
            case "P + C":
                    Y[1]=1; Y[0]=1;//valor de Y = C
                    X[1]=1; X[0]=0;//valor de X = P
                    break;
            case "A:B":
                    Y[1]=0; Y[0]=0;//valor de Y = 0
                    X[1]=1; X[0]=1;//valor de X = A:B
                    break;
            case "A:B - 1":
                    Y[1]=1; Y[0]=0;//valor de Y = -1
                    X[1]=1; X[0]=1;//valor de X = A:B
                    break;
            case "A:B + C":
                    Y[1]=1; Y[0]=1;//valor de Y = 0
                    X[1]=1; X[0]=1;//valor de X = A:B
                    break;
             }
    }

    public String comprobarOPEMODE(String primerOp, String segundoOp, String signo1, String signo2)
    {
    	primerOperando = primerOp;
    	segundoOperando = segundoOp;
    	this.signoPrimerOp=signo1;
        this.signoSegundoOp=signo2;
    	generadorOPMODE();
    	String resultado=Z[2]+""+Z[1]+""+Z[0]+ " "+ Y[1]+""+Y[0]+""+ " "+X[1]+""+X[0];
    	return resultado;
    }
    public String comprobarALUMODE()
    {
    	generarALUMODE();
    	String resultado=ALUMODE[3]+""+ALUMODE[2]+""+ALUMODE[1]+ ""+ ALUMODE[0];
    	return resultado;
    }
    public String comprobarCarryInSel(String sel)
    {
        generarCarryinSel(sel);
        String resultado=CARRYINSEL[2]+""+CARRYINSEL[1]+ ""+ CARRYINSEL[0];
    	return resultado;
    }        
            
    
    public void accionBotonOK() throws Exception
    {
       // obtenerEntradas();
        entadaDeDatos();
        primerOperando=primerOp.getSelectedItem().toString();
        segundoOperando=segundoOp.getSelectedItem().toString();
        signoPrimerOp=signoOp1.getSelectedItem().toString();
        signoSegundoOp=signoOp2.getSelectedItem().toString();
        generadorOPMODE();
        generarALUMODE();
        generarCarryinSel(carrySel.getSelectedItem().toString());
        outOPMODE.setText(Z[2]+""+Z[1]+""+Z[0]+""+Y[1]+""+Y[0]+""+X[1]+""+X[0]);
        outALUMODE.setText(ALUMODE[3]+""+ALUMODE[2]+""+ALUMODE[1]+""+ALUMODE[0]);
        outCARRYINSEL.setText(CARRYINSEL[2]+""+CARRYINSEL[1]+""+CARRYINSEL[0]);

    }
      

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel DataIn;
    private javax.swing.JPanel DataOut;
    private javax.swing.JMenuItem GuardarComo;
    private javax.swing.JComboBox OpLog;
    private javax.swing.JMenuItem abrirConf;
    private javax.swing.JLabel arit1;
    private javax.swing.JLabel arit2;
    private javax.swing.JLabel arit3;
    private javax.swing.JLabel arit4;
    private javax.swing.JLabel arit5;
    private javax.swing.JLabel arit6;
    private javax.swing.JLabel arit7;
    private javax.swing.JLabel arit8;
    private java.awt.Button button2;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JComboBox carrySel;
    private javax.swing.JTextPane entradaA;
    private javax.swing.JTextPane entradaB;
    private javax.swing.JTextPane entradaC;
    private javax.swing.JTextPane entradaP;
    private javax.swing.JTextPane entradaPCIN;
    private javax.swing.JMenuItem guardarConf;
    private javax.swing.JButton jButtonOK;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelA;
    private javax.swing.JLabel jLabelB;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel log1;
    private javax.swing.JLabel log2;
    private javax.swing.JLabel log3;
    private javax.swing.JComboBox modo;
    private javax.swing.JComboBox multX;
    private javax.swing.JComboBox multZ;
    private javax.swing.JMenuItem nuevaConf;
    private javax.swing.JComboBox operaciones;
    private javax.swing.JTextPane outALUMODE;
    private javax.swing.JTextPane outBCOUNT;
    private javax.swing.JTextPane outCARRYINSEL;
    private javax.swing.JTextPane outOPMODE;
    private javax.swing.JTextPane outP;
    private javax.swing.JTextPane outPCOUNT;
    private javax.swing.JPanel parametros;
    private javax.swing.JComboBox potencia_A;
    private javax.swing.JComboBox potencia_B;
    private javax.swing.JComboBox potencia_C;
    private javax.swing.JComboBox potencia_P;
    private javax.swing.JComboBox potencia_PCIN;
    private javax.swing.JComboBox primerOp;
    private javax.swing.JPanel resultado;
    private javax.swing.JMenu salir;
    private javax.swing.JMenuItem salirConf;
    private javax.swing.JComboBox segundoOp;
    private javax.swing.JComboBox signoOp1;
    private javax.swing.JComboBox signoOp2;
    // End of variables declaration//GEN-END:variables
}
